package com.grad.why.studentsystem.service.impl;

import com.alibaba.dubbo.config.annotation.Service;
import com.grad.why.studentsystem.domain.Grade;
import com.grad.why.studentsystem.mapper.GradeMapper;
import com.grad.why.studentsystem.service.ClassesTableService;
import com.grad.why.studentsystem.service.GradeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Component
@Service(interfaceClass = GradeService.class)
@Transactional
public class GradeServiceImpl implements GradeService {
    @Autowired
    private GradeMapper gradeMapper;
    @Override
    public List<Grade> getGrades() {
        try{
            return gradeMapper.getGrades();
        }catch (Exception e){
            e.printStackTrace();
        }
        return null;
    }
}
